#ifndef PLUGINSMANAGEDIALOG_H
#define PLUGINSMANAGEDIALOG_H

#include <QtGui/QDialog>
#include "../widgets/pluginmanagetreewidgetitem.h"
#include "globals.h"

enum {ALL = 0, ADD, MANAGE} typedef ROLE;

namespace Ui {
    class PluginsManageDialog;
}

class PluginsManageDialog : public QDialog {
    Q_OBJECT
public:
    PluginsManageDialog(QWidget *parent = 0, ROLE role = ALL);
    ~PluginsManageDialog();
    Plugin* getPlugin();

protected:
    void changeEvent(QEvent *e);

private:
    void showPlugins();
    Ui::PluginsManageDialog *m_ui;
    Plugin* m_activePlugin;
private slots:
    void on_PluginsManageDialog_rejected();
    void on_addPluginButtonBox_rejected();
    void on_resultButtonBox_rejected();
    void on_pluginsListWidget_itemPressed(QListWidgetItem* item);
    void on_addPluginButtonBox_accepted();
};

#endif // PLUGINSMANAGEDIALOG_H
